
function validate(){
	

	
}


function validate_normal_data_field(fieldname, len){
	return (!$(fieldname).val().trim() || !/^[\w\d\s]*$/.test($(fieldname).val()))
}

function verify_input_stage1(){
	if(!email_correct.test($("#u_n").val())){
		var responseJSON = {};
		responseJSON.err = "Please make sure to fill a correct email address";
		checkResponseErrStage1(responseJSON);
		return false;
	}
	if($("#u_n").val().length > 50){
		var responseJSON = {};
		responseJSON.err = "Your email address is too long";
		checkResponseErrStage1(responseJSON);
		return false;
	}
	if(validate_normal_data_field("#u_sn")){
		var responseJSON = {};
		responseJSON.err = "Please make sure to fill your screen name. Use alphanumeric characters only";
		checkResponseErrStage1(responseJSON);
		return false;
	}
	if($("#u_sn").val().length > 20){
		var responseJSON = {};
		responseJSON.err = "Your screen name should be less than 20 characters long";
		checkResponseErrStage1(responseJSON);
		return false;
	}
	if(sex == 0){
		var responseJSON = {};
		responseJSON.err = "Please select your sex";
		checkResponseErrStage1(responseJSON);
		return false;			
	}	
	if(validate_normal_data_field("#u_pd")){
		var responseJSON = {};
		responseJSON.err = "Please make sure to fill your password. Use alphanumeric characters only";
		checkResponseErrStage1(responseJSON);
		return false;
	}
	if($("#u_pd").val().length > 20){
		var responseJSON = {};
		responseJSON.err = "Your password should be than 20 characters long";
		checkResponseErrStage1(responseJSON);
		return false;
	}
	
	if($("#u_pd").val().length < 6){
		var responseJSON = {};
		responseJSON.err = "Your password should be more than 6 characters long";
		checkResponseErrStage1(responseJSON);
		return false;
	}
	if($("#u_pd").val() != $("#u_pd_c").val()){
		var responseJSON = {};
		responseJSON.err = "Your password input does not match";
		checkResponseErrStage1(responseJSON);
		return false;
	}	
	return true;
	
}


var email_correct = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
